<%@ page contentType="text/html;charset=GBK" %>
<%@ page session="false" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

<html>
<head>
<title><c:out value="${dbgrid.gridTitle}"/></title>
</head>
<link  type="text/css" rel="stylesheet" href="/component/dbgrid/dbgrid.css">

<script  type="text/javascript" src="/component/dbgrid/dbgrid.js"></script>
<script  type="text/javascript" src="/component/dbgrid/genresize.js"></script>
<script  type="text/javascript" src="/component/dropdownlist/tablesort.js"></script>
<script  type="text/javascript" src="/public/commons.js"></script>
<script  type="text/javascript" src=<c:out value="${dbgrid.gridHandler}"/>></script>
<script language="javascript">
var sortColumnName="";
var sortType="desc";
top.document.title="<c:out value="${dbgrid.gridTitle}"/>";

function ModifySize()
{
  ScrollArea.className="scrollTable";
  var iHeight,iWidth;
  var iScrHeight,iScrWidth;
  iScrHeight=screen.height;
  iScrWidth=screen.width;

  iHeight=ListTable.offsetHeight+160;
  if (iHeight>iScrHeight/2)
	  iHeight=iScrHeight/2;
  top.dialogHeight=iHeight+"px";
  
  iWidth=ListTable.offsetWidth+100;
  if (iWidth>iScrWidth*2/3)
	  iWidth=iScrWidth*2/3;
  top.dialogWidth=iWidth+"px"; 

  var testElement = document.getElementById("ScrollArea");
	if (testElement!=null)
	  initScrollTable(testElement);
}
</script>
<body>
<div class="scrollTable" id="ScrollArea">
<span class="scrollTableHead" id="HeaderSpan">
<table cellspacing="0" frame="border" id="HeaderTable" name="HeaderTable" onclick="sortColumn(event);ResizeAll();">
<thead>
   <tr>
   	   <c:forEach var="title" items="${dbgrid.gridTitles}">
       <td class="resizeMe" id='<c:out value="${title.column}"/>' type='<c:out value="${title.type}"/>' style='<c:out value="${title.style}"/>' ><nobr>&nbsp;<c:out value="${title.label}"/>&nbsp;</nobr></td>
   	   </c:forEach>
      <td class="NoClick" ></td>
   </tr>
</thead>
</table>
</span>

<span class="scrollTableBody" oncontextmenu="ContextMenu();" onscroll="SynScroll();">
<form name="listForm" method="post">
<table id="ListTable" name="ListTable" cellspacing="0">
<tbody>

   <c:forEach var="row" items="${datalist}">
   <tr>
   	  <c:forEach var="item" items="${row.items}">
      <td align="center" style='<c:out value="${item.style}"/>'><nobr>&nbsp;<c:out value="${item.label}"/>&nbsp;</nobr></td>
      </c:forEach>
   </tr>
   </c:forEach>
</tbody>
</table>
</form>
</span>
</div>
<%@ include file="/component/dropdownlist/page.jsp" %>
<script type="text/javascript" src="/component/dbgrid/eventHandler.js"></script>
</body>
</html>
<script language="javascript">
   ModifySize();
</script>


